package com.nida.loader;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class NidaConfig {
    private Map<String, String> configMap;
    
    private Set<String> routePackages = new HashSet<String>();
    
    private Set<String> iocPackages = new HashSet<String>();
    
    private Set<String> staticFolders = new HashSet<String>();
    
    private boolean isDev = true;
    
    private String encoding = "utf-8";
    
    private String webRoot;
    
    private String view404;
    
    private String view500;

    
    public NidaConfig() {
        staticFolders.add("/public");
        staticFolders.add("/assets");
        staticFolders.add("/static");
    }
    
    public Map<String, String> getConfigMap() {
        return configMap;
    }

    
    public void setConfigMap(Map<String, String> configMap) {
        this.configMap = configMap;
    }

    
    public Set<String> getRoutePackages() {
        return routePackages;
    }

    
    public void setRoutePackages(Set<String> routePackages) {
        this.routePackages = routePackages;
    }
    
    public void addRoutePackages(String ...packs){
        for (String pack : packs) {
            routePackages.add(pack);
        }
    }

    
    public Set<String> getIocPackages() {
        return iocPackages;
    }

    
    public void setIocPackages(Set<String> iocPackages) {
        this.iocPackages = iocPackages;
    }

    
    public Set<String> getStaticFolders() {
        return staticFolders;
    }

    
    public void setStaticFolders(String[] staticFolderStrs) {
        for (String staticFolder : staticFolderStrs) {
            this.staticFolders.add(staticFolder);
        }
    }

    
    public boolean isDev() {
        return isDev;
    }

    
    public void setDev(boolean isDev) {
        this.isDev = isDev;
    }

    
    public String getEncoding() {
        return encoding;
    }

    
    public void setEncoding(String encoding) {
        this.encoding = encoding;
    }

    
    public String getWebRoot() {
        return webRoot;
    }

    
    public void setWebRoot(String webRoot) {
        this.webRoot = webRoot;
    }

    
    public String getView404() {
        return view404;
    }

    
    public void setView404(String view404) {
        this.view404 = view404;
    }

    
    public String getView500() {
        return view500;
    }

    
    public void setView500(String view500) {
        this.view500 = view500;
    }
    
}
